This repository was archived by the owner on Dec 6, 2025. It is now read-only.
Conversation
7d5ac76 to
8717556
Compare
8717556 to
7785583
Compare
MaxSchaefer
suggested changes
Nov 8, 2024
Contributor
MaxSchaefer
left a comment
There was a problem hiding this comment.
Thats a huge
- Enhancement of conflict detection
- Large rewrite of some types in the property-svc
- Bare bone conflict resolution via retries
- Conflict diffs (most of this pr)
The conflict diff is done manually in our API layer. All of those areas are marked with a TODO comment to find a more generic approach later on. Are there currently any ideas how we can abstract this?
| return make([]T, 0) | ||
| } | ||
|
|
||
| func Without[T comparable](original, itemsToRemove []T) []T { |
| } | ||
|
|
||
| // SameItems yields true, iff a and b have the same elements (order may vary!) | ||
| func SameItems[T comparable](a, b []T) bool { |
Comment on lines
+25
to
+30
| PropertyValue: &models.PropertyValue{ | ||
| ID: id, | ||
| PropertyID: uuid.UUID{}, | ||
| SubjectID: uuid.UUID{}, | ||
| Value: nil, | ||
| }, |
Contributor
There was a problem hiding this comment.
Why getting rid of the constructor?
| SubjectID string `json:"subject_id"` | ||
| ID string `json:"id"` | ||
| PropertyID string `json:"property_id"` | ||
| ValueChange models.TypedValueChange `json:"value_change"` |
Contributor
There was a problem hiding this comment.
Why suffix ValueChange with Value? Its the value of the property. A new event for the property value has a new value.
Comment on lines
+62
to
+66
| if expConsistency != nil && *expConsistency != newToken { | ||
| return newToken, &common.Conflict[*models.Property]{ | ||
| Was: oldState, | ||
| Is: a.Property, | ||
| }, nil |
Contributor
There was a problem hiding this comment.
Every command handler has this check. Can we move this one layer down?
Contributor
|
We discussed this via audio Before we can merge the diff/conflict detection we need to have a future plan in place to get rid of the manual mappings.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issues does this pull request close?
closes #808
closes #860
return consistency, not oldConsistency